class Solution {
public:
    vector<string> removeAnagrams(vector<string>& words) {
        vector<string> str;
        string prev="";
        for(int i=0;i<words.size();i++){
            string temp=words[i];
            sort(temp.begin(),temp.end());
            if(temp!=prev){
                str.push_back(words[i]);
                prev=temp;
            }
        }
        return str;
    }
};
